/* 基础样式 */
.markdown-body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  word-wrap: break-word;
}

.markdown-body > > > h1, .markdown-body > > > h2, .markdown-body > > > h3,
.markdown-body > > > h4, .markdown-body > > > h5, .markdown-body > > > h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.markdown-body > > > pre {
  background-color: #f6f8fa;
  border-radius: 6px;
  padding: 16px;
  overflow: auto;
  margin: 16px 0;
}

.markdown-body > > > code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  font-size: 85%;
  padding: 0.2em 0.4em;
  margin: 0;
  background-color: rgba(27, 31, 35, 0.05);
  border-radius: 3px;
}

.markdown-body > > > pre code {
  background-color: transparent;
  padding: 0;
  margin: 0;
  border-radius: 0;
}

/* 代码块样式 */
.code-block {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  margin: 16px 0;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: #f6f8fa;
  border-bottom: 1px solid #eaecef;
  font-size: 12px;
  font-weight: 500;
  color: #586069;
}

.code-language {
  background-color: rgba(27, 31, 35, 0.05);
  padding: 2px 6px;
  border-radius: 3px;
}

.copy-button {
  background: none;
  border: none;
  cursor: pointer;
  color: #586069;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-button:hover {
  color: #0366d6;
}

.copy-button svg {
  width: 14px;
  height: 14px;
}

/* 复制成功状态 */
.copy-button.copied {
  color: #22863a;
}

.copy-button.copied svg {
  display: none;
}

.copy-button.copied::after {
  content: "已复制!";
  font-size: 12px;
}